package com.catmiao.spark.rdd.io

import org.apache.spark.{Partitioner, SparkConf, SparkContext}

/**
 * @title: Spark01_RDD_Dep
 * @projectName spark_study
 * @description: TODO
 * @author ChengMiao
 * @date 2024/2/28 23:20
 */
object Spark01_RDD_IO_save {


  def main(args: Array[String]): Unit = {
    val sparkCon = new SparkConf().setMaster("local[*]").setAppName("rdd")

    val sparkContext = new SparkContext(sparkCon)

    val rdd = sparkContext.makeRDD(
      List(
        ("a", 1),
        ("b", 2),
        ("c", 3),
      )
    )

    rdd.saveAsTextFile("output4")
    rdd.saveAsObjectFile("output5")
    rdd.saveAsSequenceFile("output6")



    sparkContext.stop()
  }


}
